﻿using Quartz;
using Quartz.Impl.Triggers;

namespace TaskMasterByQuartz.Domain.Helper
{
    public static class TypeConversionHelper
    {
        /// <summary>
        /// 将Trigger类型做转换
        /// </summary>
        /// <typeparam name="TEntity">SimpleTriggerImpl或CronTriggerImpl</typeparam>
        /// <param name="trigger"></param>
        /// <returns></returns>
        public static TEntity TriggerTypeConversion<TEntity>(ITrigger trigger) where TEntity : AbstractTrigger
        {
            return trigger as TEntity;
        }
    }
}
